﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PaladoreQuestItem
{
    class Quest
    {
        public string name;
        public Item reward;
        public int xp;



        public override string ToString()
        {
            string format = "";
            try
            {
                if (reward != null) format = string.Format("Quest:\t{0}\nReward:\t{1}", name, reward.name);
                else if (xp > 0) format = string.Format("Quest:\t{0}\nXP:\t{1}", name, xp);
                else format = string.Format("Quest:\t{0}\nReward:\t{1}\nXP:\t{2}", name, "Unknown", "Unknown");
            }
            catch (Exception e) { return e.ToString(); }
            return format;
        }
        public string ToString(PIQ sender)
        {
            string format = "";
            try
            {
                if (reward != null) format = string.Format("Quest:\t{0}\nReward:\t{1}", name, reward.name);
                else if (xp > 0) format = string.Format("Quest:\t{0}\nXP:\t{1}", name, xp);
                else format = string.Format("Quest:\t{0}\nReward:\t{1}\nXP:\t{2}", name, "Unknown", "Unknown");
            }
            catch (Exception e) { return e.ToString(); }
            return format;
        }
    }
}
